extends /templates/base-flat

block content
  .container
    if me.get('anonymous')
      p(data-i18n="account_settings.not_logged_in") Log in or create an account to change your settings.

    else
      .container-fluid#prepaidViewContainer
        ol.breadcrumb
          li
            a(href="/")
              span.glyphicon.glyphicon-home
          li
            a(href="/account", data-i18n="nav.account")
          li.active(data-i18n="account.prepaid_codes")

        .row
          .col-md-12
            .panel.panel-default
              .panel-heading
                .panel-title
                  a(data-toggle="collapse" href="#purchasepanel")
                    span(data-i18n="subscribe.subscription_status")
              .panel-collapse.collapse(class=view.ppcQuery ? "": "in")#purchasepanel
                .panel-body
                  if me.isPremium()
                    - date = me.premiumEndDate()
                    span(data-i18n="subscribe.currently_free_until", data-i18n-options={date}, class="status-info")
                    br
                  else
                    span(data-i18n="subscribe.currently_not_free" class="status-info")
                  if features.chinaHome
                    button.start-subscription-button.btn.btn-lg.btn-success(data-i18n="subscribe.subscribe_title")
                  else
                    p Prepaids are no longer available for purchase.
        .row
          .col-md-12
            .panel.panel-default
              .panel-heading
                .panel-title
                  a(data-toggle="collapse" href="#redeempanel")
                    span(data-i18n="account_prepaid.redeem_codes")
              .panel-collapse.collapse.in#redeempanel
                .panel-body
                  .form-group
                    label(for="ppc code" data-i18n="account_prepaid.prepaid_code")
                    span.spr :
                    input.input-ppc.form-control(name="ppc", type="text", value=view.ppc, required)
                  if view.ppcInfo && view.ppcInfo.length > 0
                    p
                      each info in view.ppcInfo
                        div
                          != info
                  .row
                    .col-xs-6
                      span.spr
                        button#lookup-code-btn.btn.btn-info.btn-block(data-i18n="account_prepaid.lookup_code")
                    .col-xs-6
                      span
                        button#redeem-code-btn.btn.btn-success.btn-block(data-i18n="account_prepaid.apply_account")